home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet multimedia / Linux LiveCD / GeeXboX 1.0 EN / geexbox-1.0-en.i386.iso / GEEXBOX / etc / init.d / 76_mp-dvbcard < prev    next >
Text File  |  2006-06-21  |  799b  |  35 lines

  1. #!/bin/sh
  2. #
  3. # configure MPlayer's DVB settings
  4. #
  5. # runlevels: geexbox, debug
  6.  
  7. echo "### Configuring MPlayer's DVB support ###"
  8.  
  9. CHANNELS_CONF=/etc/mplayer/channels.conf
  10.  
  11. if [ -f /var/dvbcard ]; then
  12.   . /var/dvbcard
  13.  
  14.   # build DVB channels configuration file
  15.   if [ ! -f $CHANNELS_CONF ]; then
  16.     if [ -f /etc/dvb.conf ]; then
  17.       dvbscan -x 0 /etc/dvb.conf > $CHANNELS_CONF
  18.  
  19.       if [ -s $CHANNELS_CONF ]; then
  20.         # remove non-coherent detected channels
  21.         grep -v "^\[.*\]:" $CHANNELS_CONF > /tmp/channels.conf
  22.         mv /tmp/channels.conf $CHANNELS_CONF
  23.       fi
  24.     fi
  25.   fi
  26. fi
  27.  
  28. # no DVB card or no configured channels
  29. if [ ! -f /var/dvbcard -o ! -s $CHANNELS_CONF ]; then
  30.   # remove DVB options from menu
  31.   sed -i 's/.*ok="set_menu dvb_sel".*//' /etc/mplayer/menu.conf
  32. fi
  33.  
  34. exit 0
  35.